<template>
    <div class="VCard">

        <div class="title">
            <SvgIcon class="svg-back" v-if="back" iconClass="back" @click="goBack"></SvgIcon>
            {{ title }}
        </div>
        <div class="VCard-content">
            <slot></slot>
        </div>
    </div>
</template>

<script>
import router from '@/router';
export default {
    name: "VCard",
    props: {
        title: {
            type: String,
            default: '标题'
        },
        back: {
            type: Boolean,
            default: false
        }

    },

    data() {
        return {

        };
    },
    methods: {
        goBack() {
            router.go(-1)
        }
    },
    watch: {

    }
}
</script>

<style lang="scss" scoped>
.VCard {
    margin-bottom: 30px;

    .VCard-content {
        // margin-left: 100px !important;
    }


    .title {
        font-weight: 700;
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 10px;
        color: rgba(0, 0, 0, 0.85);

        .svg-back {
            cursor: pointer;
        }
    }

}
</style>
